home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d2 / where41a.arc / WHEREIS.DOC < prev    next >
Text File  |  1990-10-26  |  42KB  |  1,035 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                            WhereIs  Version 4.1a
  22.  
  23.                            Released Nov 1,  1990
  24.  
  25.                      A PC-DOS / MS-DOS Fast File Finder
  26.  
  27.  
  28.                      Written by Keith Ledbetter
  29.                                 4240 Ketcham Drive
  30.                                 Chesterfield, VA  23832
  31.                                 (804) 674-0780
  32.                                 (6:00pm - 10:00pm Eastern Time)
  33.  
  34.  
  35.                     Electronic mail on GEnie      to ORION.MICRO
  36.                                        CompuServe to 72240,1221
  37.  
  38.  
  39.    Program and Documentation Copyright 1988, 1989, 1990 by Keith Ledbetter.
  40.                              All rights reserved.
  41.  
  42.    Portions Copyright Borland, International.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                            ACKNOWLEDGEMENTS
  65.  
  66.  
  67.         Special thanks to Herb Martin, Hal Hudler, Chris King, David
  68.         Essex, Arnold Kedy, and all of the other BETA testers for their
  69.         invaluable suggestions and debugging help.  Also, special thanks
  70.         to the crowd on the Blue Ridge Express BBS system (804-790-1675)
  71.         for constantly prodding me to put in that "one other nice feature"
  72.         they'd like to see!
  73.  
  74.  
  75.  
  76.         WhereIs is distributed as a Shareware program.  Simply put, this
  77.         means that you may try out the program for a reasonable amount of
  78.         time, after which you will pay for the program if you find it of
  79.         use to you.   Please help support the Shareware concept by paying
  80.         for and registering your copy.   Please see the order form on the
  81.         following page.   When you register your copy of WhereIs, you will
  82.         receive a "branding" utility that will allow you to brand all
  83.         future versions of WhereIs with your name and serial number.  No
  84.         upgrade fees in the future; you only pay once!
  85.  
  86.  
  87.  
  88.  
  89.         WhereIs is written in Turbo C v2.0 by Borland, International.
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.    WhereIs Registration Form     Keith Ledbetter
  98.                                  4240 Ketcham Drive
  99.                                  Chesterfield, VA  23832
  100.  
  101.  
  102.    WhereIs Version 4.1a                        Quantity    Price
  103.  
  104.    Disk with branding utility ($15/copy):      _______   __________
  105.  
  106.         Total enclosed                                   __________
  107.  
  108.    Please make payment by check or money order (in US funds) payable
  109.    to "Keith Ledbetter".
  110.  
  111.    Please specify the diskette size(s) that are acceptable for you:
  112.  
  113.    ___ 5.25" 1.2MB   ___ 3.5" 1.44MB   ___ 5.25" 360KB   ___ 3.50" 720KB
  114.  
  115.  
  116.    Name    ________________________________________________________
  117.  
  118.    Company ________________________________________________________
  119.  
  120.    Address ________________________________________________________
  121.  
  122.            ________________________________________________________
  123.  
  124.    Phone   ________________________________________________________
  125.  
  126.  
  127.    Where did you get WhereIs?   ____________________________________
  128.  
  129.    Multi-System and Reseller Licenses:
  130.  
  131.         Site, corporate, network, and reseller licenses are available
  132.         for WhereIs.  Check the line on the order form or contact me for
  133.         more information.  The following schedule provides some
  134.         examples of multi-system license fees.  The fee includes one
  135.         master diskette which you may then copy and use on the number
  136.         of machines listed below:
  137.  
  138.                         # Users        Price
  139.                         -------       -------
  140.                            5        $   70.00   ($14 / copy)
  141.                           10           130.00   ($13 / copy)
  142.                           25           300.00   ($12 / copy)
  143.                           50           550.00   ($11 / copy)
  144.                          100         1,000.00   ($10 / copy)
  145.                        Unlimited     1,500.00
  146.  
  147.                                  WhereIs v4.1a                        Page 1
  148.  
  149.  
  150. Introduction
  151.  
  152.  
  153.  
  154. Note:  New features in this version are marked with an '|' beside them.
  155.  
  156.  
  157.    Thank you for taking the time to try out WhereIs v4.1a.  You will find
  158. that WhereIs can satisfy almost all of your file searching needs.  It has
  159. a multitude of search options, some of which are:
  160.  
  161.             o   The ability to search inside ARC, ZIP, PKA, PAK,
  162.                 ZOO, and LZH archived files.
  163.  
  164.             o   True regular expression searching on filenames.
  165.  
  166.             o   The ability to display duplicate entries across all of
  167.                 your disk drives (even those duplicates that are in the
  168.                 archive files mentioned above!).
  169.  
  170.             o   Up to 25 filenames can be excluded from the search.
  171.  
  172.             o   Built-in ZIP archive error detection.  Every time you
  173.                 do a search that includes ZIP files, every ZIP file on
  174.                 your hard drive is checked for integrity!
  175.  
  176.             o   The ability to do restrictive searches on such criteria
  177.                 as file dates and file sizes.
  178.  
  179.             o   The ability to do a verified (or un-verified) deletion
  180.                 of any files found in the search (great for periodically
  181.                 deleting those .BAK files or files with a size of zero).
  182.  
  183.             o   Support for Novell's "volume" configurations.
  184.  
  185.             o   Default switches can be set in an environment variable.
  186.  
  187.  
  188.    Don't be fooled by imitations.  There are recent file finder programs out
  189. there making claims that their "features" are "never before found in any
  190. file finder programs".   Funny!  Their "features" (like date-range searching
  191. and filesize searching) have been in our program a YEAR before they were
  192. even released!
  193.  
  194.  
  195.    Now, here is the only pitch that you'll see in this document for some of
  196. your hard-earned money.   WhereIs (as of v4.0) is now being distributed as
  197. a Shareware product.   If you find that you are still using this program a
  198. couple of weeks after you get it, please take the time to fill out the
  199. registration form at the front of this documentation file and send in your
  200. registration fee of $15.   This program has taken up a lot of my time over
  201. the last two years (just ask my wife!...well, on second thought, you'd better
  202. not..), and I feel that I can better support those people who are using
  203. WhereIs by going this route.  And, by the volumes of suggestions that I get
  204. on the program, there must be quite a few of you out there!   As of this
  205.  
  206.                                  WhereIs v4.1a                        Page 2
  207.  
  208.  
  209. Introduction
  210.  
  211.  
  212. release, there will be (limited) telephone support for WhereIs to those users
  213. who register their copies of WhereIs.   I say limited because, like many other
  214. Shareware authors, I make my "real" living by programming at a "real" job
  215. during the day.   Registered WhereIs users may call me at (804) 674-0780
  216. between the hours of 6:00 pm - 10:00 pm (Eastern) Monday-Friday, and from
  217. 10 am - 6 pm on the weekends.   Thank you for supporting WhereIs and my other
  218. Shareware programs!
  219.  
  220.                                  WhereIs v4.1a                        Page 3
  221.  
  222.  
  223. What WhereIs Does
  224.  
  225.  
  226.  
  227.   WHEREIS helps hard drive owners retain (some of) their sanity by locating
  228. files on their hard drives.   We've all had situations where we KNOW that a
  229. file is somewhere on the hard drive; we just can't remember where.  Another
  230. added feature of WHEREIS is that it can be told to look inside of ARC files,
  231. too.  This is a very important feature with the common acceptance of archived
  232. files these days.  In this document, "ARC files" is used as a generic term
  233. for any file with the following extension:
  234.  
  235.                 .ARC    .ZIP    .LZH    .ZOO    .PAK    .PKA
  236.  
  237.   Other advanced features of WHEREIS include (a) grep-type searching on
  238. filenames (ie: find filenames with a '4' in the fifth character), (b) date
  239. and time range specifiers, and (c) file size range specifiers.  There are
  240. many switches for WHEREIS, and it is highly recommended that you read this
  241. document carefully so that you will be able to get the most out of the
  242. program.  There are very few things you can't do with WHEREIS when it comes
  243. to locating files.   As an advanced example:
  244.  
  245.  
  246.     whereis cde:*.bak "[0-9]" -gt1024 -lt2048 -s12-10-89 -b12-20-89 -v
  247.  
  248.  
  249.    How about THAT for a command line?  What this would do is delete all .BAK
  250. files on drives C:, D:, and E: that have a number somewhere in the filename
  251. (ie: PROG01.BAK).  But, only if the file is between 1025 and 2047 bytes in
  252. length, and was last modified sometime between the dates of 12-10-89 and
  253. 12-19-89.
  254.  
  255.    Yes, I know that you'll probably never need to do something exotic as
  256. this, but it shows the power that you have with WHEREIS.  Take the time to
  257. learn WHEREIS, and it will always be your friend (sounds like Mr. Rogers!).
  258.  
  259.                                  WhereIs v4.1a                        Page 4
  260.  
  261.  
  262. The Command Line Interface
  263.  
  264.  
  265.  
  266.   Invoking WHEREIS is simplicity itself.  If you do not specify a path,
  267. then WHEREIS will search the entire default drive.  If you specify a
  268. starting path, then the search will occur from that path downward (only).
  269.  
  270.   Here are some basic command line examples:
  271.  
  272.   whereis ab*.c                 search entire default drive for any filename
  273.                                 matching "ab*.c".
  274.  
  275.   whereis \turboc\ab*.c         search downward from the \turboc\ directory
  276.                                 on the default drive looking for "ab*.c".
  277.  
  278.   whereis d:*.dat -a            search entire drive d: and all ARC files
  279.                                 on drive d: looking for "*.dat".
  280.  
  281.   whereis cd:*.dat -a           search entire drive c: and drive d: and all
  282.                                 ARC files looking for "*.dat".
  283.  
  284.   whereis myprog                search entire default drive looking for
  285.                                 "myprog.*" (WHEREIS will append a ".*" to
  286.                                 a filename with no extender specified).
  287.  
  288.  
  289.                                  WhereIs v4.1a                        Page 5
  290.  
  291.  
  292. Additional Command Line Switches
  293.  
  294.  
  295.  
  296.      Switch:  -A
  297.     Meaning:  search all ARC files
  298. Description:  The '-a' switch tells WHEREIS to look in any ARC file
  299.               encountered for a matching filename.  If a matching filename
  300.               is found, it will be displayed in parenthesis along with the
  301.               full name of the ARC file it resides in.
  302.  
  303.  
  304.      Switch:  -AO
  305.     Meaning:  search -ONLY- ARC files
  306. Description:  The '-ao' switch tells WHEREIS to ONLY look in any ARC file
  307.               encountered for a matching filename.  If a matching filename
  308.               is found, it will be displayed in parenthesis along with the
  309.               full name of the ARC file it resides in.
  310.  
  311.  
  312.      Switch:  -ARC -PAK -PKA -LZH -ZIP -ZOO
  313.     Meaning:  search only the ARC formats specified
  314. Description:  These switches tell WHEREIS to only look inside the specified
  315.               ARC files for a matching filename.  For example, if you are
  316.               sure that the file named MYPROG.EXE is somewhere on drive C:
  317.               in a .ZIP file, then
  318.  
  319.                         whereis c:myprog.exe -zip
  320.  
  321.               would find the file.  Specifying individual ARC format switches
  322.               slightly speeds up WHEREIS, because the program doesn't have to
  323.               waste time searching for (and through) all six ARC formats.
  324.  
  325.  
  326.      Switch:  "regular expression"
  327.     Meaning:  do a grep-type search on the filename
  328. Description:  Any command line string enclosed within double quotes will be
  329.               considered a regular expression, and will cause WHEREIS to go
  330.               into its "grep mode".   A regular expression can be used with
  331.               or without a filename search mask.
  332.  
  333. |             As of version 4.1a, when you specify a regular expression,
  334. |             WhereIs will also look inside of 4DOS description files for
  335. |             the string specified.  If a match is found, the normal output
  336. |             line will be displayed, along with the actual 4DOS description
  337. |             line below the filename line.
  338.  
  339.               Special characters within the quoted string are as follows:
  340.  
  341.  
  342.                       ^  -  start matching at the first of the filename
  343.                       ?  -  match any character in this position
  344.                     [..] -  range check on character at this position
  345.  
  346.               The easiest way to explain is with a few examples:
  347.  
  348.                                  WhereIs v4.1a                        Page 6
  349.  
  350.  
  351. Additional Command Line Switches
  352.  
  353.  
  354.  
  355.               whereis *.bat
  356.  
  357.                   the regular search; will display any .BAT file found.
  358.  
  359.  
  360.               whereis *.bat "42"
  361.  
  362.                   will display any .BAT file that contains the characters
  363.                   "42" anywhere in the filename.
  364.  
  365.  
  366.               whereis *.bat "^???42"
  367.  
  368.                   will display any .BAT file that contains the characters
  369.                   "42" in the fourth position of the filename.
  370.  
  371.  
  372.               whereis "[0-9]"
  373.  
  374.                   will display any file that contains a number anywhere in
  375.                   the filename.
  376.  
  377.  
  378.               whereis "[^0-9]"
  379.  
  380.                   will display any file that DOES NOT contain a number
  381.                   anywhere in the filename.
  382.  
  383.  
  384.               whereis "^???a?[acew-z]"
  385.  
  386.                   will display any file that contains an 'a' in the fourth
  387.                   position of the filename and the letters 'a', 'c', 'e',
  388.                   'w', 'x', 'y', or 'z' in the sixth position of the name.
  389.  
  390.  
  391.               These grep masks also work when looking inside of ARC files.
  392.  
  393.  
  394. |     Switch:  -C"command to execute"
  395. |              -O"command to display"
  396. |    Meaning:  Execute (or display) a DOS command on all files found.
  397. |Description:  This switch tells WhereIs to execute the command within the
  398. |              double quotes on each matching file found.  When doing this
  399. |              command, you have access to replaceable parameters to get to
  400. |              the full filename, the pathname only, the filename only, and
  401. |              the name of the archive member (if you're searching archives).
  402. |              The only difference between the -o and the -c switches is
  403. |              that -c actually executes the command whereas -o prints the
  404. |              command it WOULD have executed to the screen.  Because of
  405. |              this, the -o command can be invaluable.  First, you can use
  406.  
  407.                                  WhereIs v4.1a                        Page 7
  408.  
  409.  
  410. Additional Command Line Switches
  411.  
  412.  
  413. |              it before doing the -c command to make sure that what you
  414. |              think you told WhereIs to do is the same as what you DID
  415. |              tell it to do.  In other words, if you're about to do a
  416. |              command that could have side effects (such as deleting files),
  417. |              it would be good to do the -o command first and look at what
  418. |              WhereIs actually will do when you execute the -c command.
  419. |              The second use of the -o command is to redirect all of the
  420. |              command lines into a batch file that you can execute later.
  421. |              Replacement parameters for both -c and -o are as follows:
  422. |
  423. |       Parm      Desc           Normal example      Archive example
  424. |       ----      ----          -----------------   -----------------
  425. |        &f   full file name    c:\dos\xcopy.exe    c:\dos\comlib.zip
  426. |        &p   path name only    c:\dos\             c:\dos\
  427. |        &n   file name only    xcopy.exe           comlib.zip
  428. |        &m   archive member    <blank>             xcopy.exe
  429. |
  430. |              A few examples would probably be the best way to explain this
  431. |              concept.  Let's do a few "real-world" examples here.
  432. |
  433. |              1)  You have many .DOC files straying all over your hard drive,
  434. |                  and you'd like to incorporate them all into one simple
  435. |                  ZIP file.  You could do this with the following command:
  436. |
  437. |                     C:> whereis -d *.doc -c"pkzip -m c:\docs.zip &f"
  438. |
  439. |              2)  You want to make a copy of all of your Pascal source code
  440. |                  that has been changed today so that you can take it home
  441. |                  with you:
  442. |
  443. |                     C:> whereis -d *.pas -s0 -c"copy &f a:\"
  444. |
  445. |              3)  You want to get a text file listing of every directory
  446. |                  name on your hard drive(s) in the file HARDDRIV.DAT:
  447. |
  448. |                     C:> whereis -d nul -o"&p" >c:\harddriv.dat
  449. |
  450. |              4)  You want to delete every .BAK file on your system (even
  451. |                  those that are in ZIP files).  This would be a 2-step
  452. |                  process:
  453. |
  454. |                  First, delete the normal .BAK files
  455. |
  456. |                     C:> whereis *.bak -v -n
  457. |
  458. |                  Then, delete them from the archive files
  459. |
  460. |                     C:> whereis -d -ao -zip *.bak -c"pkzip -d &f &m"
  461. |
  462.  
  463.      Switch:  -D
  464.     Meaning:  search all available hard drives.
  465.  
  466.                                  WhereIs v4.1a                        Page 8
  467.  
  468.  
  469. Additional Command Line Switches
  470.  
  471.  
  472. Description:  This switch tells WHEREIS to search every hard drive on your
  473.               system (including network drives), starting with C:.  In other
  474.               words, if you have drives C:, D:, E:, and F: then the following
  475.               two command lines would do the exact same thing:
  476.  
  477.                         whereis cdef:myprog.exe
  478.                     or
  479.                         whereis myprog.exe -d
  480.  
  481.       Switch: -DUP
  482.      Meaning: Display only duplicate filenames on the drives searched.
  483.  Description: If the -DUP switch is specified, only those files that have
  484.               duplicate entries will be displayed.  All other switches are
  485.               active during -DUPlicate processing.  For example, the
  486.               following command line:
  487.  
  488.                       whereis *.bat -a -d -dup
  489.  
  490.               would cause WhereIs to search all hard drives (-d) looking for
  491.               duplicate .BAT files.  WhereIs would also look inside of all
  492.               found Archive files (-a).
  493.  
  494.  
  495.      Switch:  -E
  496.     Meaning:  use "*.*" for subdirectory searches
  497. Description:  By default, WHEREIS assumes that you don't have any directories
  498.               on your hard drive that have extensions in the filename.  So,
  499.               when WHEREIS is looking for new directories, it will search with
  500.               a filemask of "*.".   This significantly speeds up the hard drive
  501.               search.  If you do have directories that have extensions in their
  502.               names, you must specify the '-e' switch or WHEREIS -will not-
  503.               find files within that subdirectory.  The easiest thing to do is
  504.               to set your WHEREIS environment variable to default to this
  505.               option (see "The WHEREIS Environment Variable" below).
  506.  
  507.  
  508.      Switch:  -F
  509.     Meaning:  display filenames only
  510. Description:  This switch causes WHEREIS to display only the filename of
  511.               matching files that it finds.  No header or footer information
  512.               will be displayed.  This is most useful when you are
  513.               redirecting the output from WHEREIS to a file.
  514.  
  515.  
  516.      Switch:  -G
  517.     Meaning:  go to the drive and subdirectory of the found file
  518. Description:  If you specify the '-g' switch, WHEREIS will prompt you with
  519.  
  520.                             Goto this subdirectory? _
  521.  
  522.               whenever it finds a matching file.  Press 'Y' to change to
  523.               the drive and subdirectory displayed, or 'N' to continue
  524.  
  525.                                  WhereIs v4.1a                        Page 9
  526.  
  527.  
  528. Additional Command Line Switches
  529.  
  530.  
  531.               searching the drive.  You may also enter 'Q' to abort WHEREIS.
  532.  
  533.  
  534.      Switch:  -H
  535.     Meaning:  start searching in the current subdirectory
  536. Description:  The '-h' switch tells WHEREIS "start searching where I'm at
  537.               right now".   For example, if you are currently in the TURBOC
  538.               subdirectory, then the following two commands would do the
  539.               exact same thing:
  540.  
  541.                          whereis \turboc\myprog.c
  542.                      or
  543.                          whereis myprog.c -h
  544.  
  545.               With the '-h' switch, WHEREIS can be used as a directory
  546.               program with the ability to list ARC files.  For example,
  547.               you could create the following batch file and call it
  548.               ARCDIR.BAT:
  549.  
  550.                             @echo off
  551.                             whereis %1 -h -a
  552.  
  553.               Now, when you give the command "ARCDIR", you will be shown
  554.               the directory listing, along with all files contained within
  555.               ARC files in your current subdirectory.
  556.  
  557.  
  558.      Switch:  -I
  559.     Meaning:  ignore the environment variable WHEREIS
  560. Description:  The '-i' switch tells WHEREIS to ignore any default switches
  561.               that you have set with the WHEREIS environment variable.  This
  562.               is most useful if you have page-breaking set up as a default,
  563.               but need to redirect WHEREIS's output to a file.  You could do
  564.               this with a command such as:
  565.  
  566.                            whereis *.bat -i >files.dat
  567.  
  568.  
  569.      Switch:  -M -R
  570.     Meaning:  modify WHEREIS's default output display
  571. Description:  These switches allow you to modify the way that WHEREIS
  572.               displays its output.  By default, WHEREIS will place the
  573.               filename on the left of the screen (just like DIR does).
  574.               If you prefer, you can use '-M' to place the filename in the
  575.               middle of the screen, or '-R' to place the filename on the
  576.               right of the screen.  Usually set in the environment.
  577.  
  578.  
  579.      Switch:  -K
  580.     Meaning:  search only the PATH directories
  581. Description:  This switch will cause WHEREIS to only search in the directories
  582.               that are specified in your DOS PATH environment variable.
  583.  
  584.                                  WhereIs v4.1a                        Page 10
  585.  
  586.  
  587. Additional Command Line Switches
  588.  
  589.  
  590.               This option will be used very rarely, but was requested by a
  591.               user.
  592. |      Note:  As of v4.1a, this switch was changed.  The '-K' switch was
  593. |             previously the '-C' switch.
  594.  
  595.      Switch:  -Y
  596.     Meaning:  display the output with European-style dates (DD-MM-YY)
  597. Description:  Again, a seldom-used switch, but requested by a user.
  598.  
  599.  
  600.      Switch:  -V [-N]
  601.     Meaning:  do a verified delete of any matching files found
  602. Description:  These switches tell WHEREIS to delete any matching files found.
  603.               If you specify only the '-V' switch, then WHEREIS will prompt
  604.               you before it deletes each file.  If you specify BOTH the '-V'
  605.               and the '-N' switch, then WHEREIS --WILL NOT-- prompt you; it
  606.               will just go ahead and delete the file (PLEASE be careful with
  607.               this one!).  I use these switches daily to clean up all of the
  608.               .BAK files created by Turbo C.  For example:
  609.  
  610.                           whereis *.bak -v -n
  611.  
  612.  
  613.      Switch:  -W
  614.     Meaning:  show wasted space occupied by matching files.
  615. Description:  This switch is used very little, but can come in handy if you
  616.               are trying to figure out how much disk space is being wasted
  617.               by a bunch of very small files (batch files are a prime
  618.               example).  WHEREIS will total and display to you the amount of
  619.               disk space that is being wasted due to cluster overhead.
  620.  
  621.  
  622.      Switch:  -U
  623.     Meaning:  display all output in upper case
  624. Description:  Some people still prefer to see directory-type listings in
  625.               ALL UPPER CASE; if you're one of these people, then just use
  626.               the '-U' switch.  It's best to set this in your WHEREIS
  627.               environment variable.
  628.  
  629.  
  630.      Switch:  -P
  631.     Meaning:  pause and wait for a key when the screen fills up
  632. Description:  A very handy switch, best used when set in your environment
  633.               variable.   It will cause WHEREIS to pause the screen when it
  634.               fills up, so you don't have to go crazy trying to hit the
  635.               control-S key.
  636.  
  637.  
  638.      Switch:  -Xfilemask
  639.     Meaning:  exclude this filespec from the search
  640. Description:  The '-X' switch allows you to exclude certain filenames from
  641.               the directory search.  You can specify up to 25 exclusion
  642.  
  643.                                  WhereIs v4.1a                        Page 11
  644.  
  645.  
  646. Additional Command Line Switches
  647.  
  648.  
  649.               masks.   For example, if you wanted to see all files on your
  650.               drive except for .OBJ and .PRG files, you could do:
  651.  
  652.                         whereis *.* -x*.obj -x*.prg
  653.  
  654.  
  655.      Switch:  -LT -EQ -GT
  656.     Meaning:  specify a file size range
  657. Description:  These switches allow you to only search for files within a
  658.               certain size range.  Some examples:
  659.  
  660.                          whereis *.PAS -LT1024
  661.  
  662.               would display all .PAS files that have a size smaller than
  663.               1024 bytes.
  664.  
  665.                          whereis *.* -EQ0
  666.  
  667.               would display all files that have a length of zero.
  668.  
  669.                          whereis *.* -GT500000
  670.  
  671.               would display all files that are larger than 500,000 bytes.
  672.  
  673.                          whereis *.* -GT1023 -LT2049
  674.  
  675.               would display all files that are between 1,024 and 2,048
  676.               bytes in size.
  677.  
  678.  
  679.      Switch:  -S -B
  680.     Meaning:  specify a file date range
  681. Description:  These switches allow you to only search for files within a
  682.               certain date range.  These switches are the "since" (S)
  683.               switch and the "before" (B) switch.  Both switches come in
  684.               two flavors; you can specify the date in number of days
  685.               (ie: -S5) or with a full date (ie: -S8-19-89).   If you
  686.               specify either switch with no date specifier, then it defaults
  687.               to '0 days'.  These date specifiers are also used when looking
  688.               inside of archive files.  Some examples:
  689.  
  690.                           whereis *.PAS -S5
  691.  
  692.               would display all .PAS files that have a date greater than or
  693.               equal to 5 days ago (in other words, modifed SINCE 5 days ago).
  694.  
  695.                           whereis *.PAS -S5-1-89
  696.  
  697.               would display all .PAS files modified SINCE  5/1/89.
  698.  
  699.                           whereis *.PAS -B5
  700.  
  701.  
  702.                                  WhereIs v4.1a                        Page 12
  703.  
  704.  
  705. Additional Command Line Switches
  706.  
  707.  
  708.               would display all .PAS files modifed BEFORE 5 days ago.
  709.  
  710.                           whereis *.PAS -B5-1-89
  711.  
  712.               would display all .PAS files modified BEFORE 5/1/89.
  713.  
  714.                           whereis *.PAS -S5-1-89 -B6-1-89
  715.  
  716.               would display all .PAS files modified between the dates of
  717.               5-1-89 and 5-31-89.
  718.  
  719.                           whereis *.PAS -S
  720.  
  721.               would display all .PAS files that have been modified today
  722.               (defaults to '-S0').
  723.  
  724.  
  725.      Switch:  -Z
  726.     Meaning:  show only files with their archive bit set
  727. Description:  The '-Z' switch allows you to display only those files which
  728.               have their "archive bit" set on.  In other words, it will show
  729.               all files that have been modified since your last backup (if
  730.               your backup program clears the archive bit, that is).
  731.  
  732.  
  733.      Switch:  -HIDDEN
  734.     Meaning:  also show hidden and system files
  735. Description:  The '-hidden' switch allows you to also display those files
  736.               which are "system" and "hidden" files.
  737.  
  738.                                  WhereIs v4.1a                        Page 13
  739.  
  740.  
  741. The WHEREIS and WI_DRIVES Environment Variables
  742.  
  743.  
  744.  
  745.     When WHEREIS begins execution, it searches the environment for a variable
  746. named WHEREIS.   If this variable is present, its contents will be appended
  747. onto the command line just as if you had entered them in from the keyboard.
  748. This option is very handy for setting "default options" that you'd like for
  749. WHEREIS to perform every time.   Simply set the WHEREIS variable in your
  750. AUTOEXEC.BAT file.   For example, if you'd like to always (a) page break
  751. when the screen fills up, (b) display the filenames on the right of the
  752. screen, and (c) display output in upper case, you would put the following in
  753. your AUTOEXEC.BAT file:
  754.  
  755.                     SET WHEREIS=-P -R -U
  756.  
  757.  
  758.     WHEREIS would then use these options every time you executed the program.
  759.  
  760.  
  761.    If you specify the "-d" switch (search all drives), then WHEREIS will
  762.  search the environment looking for a variable named WI_DRIVES.   If this
  763.  variable is found, WHEREIS will use this list as the definition of the
  764.  drives to search.  If the WI_DRIVES variable does not exist, WHEREIS will
  765.  use its own list, which defaults to drives c: through z: (ie: cde...z).
  766.  
  767.    The WI_DRIVES variable was added mainly for those people using networks.
  768.  WHEREIS's reckless abandon of simply searching all drive letters caused
  769.  some network users a lot of headaches.   It seems that those affected the
  770.  most were users of Novell networks.   On Novell, you can specify many
  771.  different drive letters for the same "volume" (ie: partition), so WHEREIS
  772.  would show the same physical file many times, since WHEREIS thought that
  773.  it was really on a different drive.   With the WI_DRIVES variable, it is
  774.  up to the user to tell WHEREIS what drives are physically different.  For
  775.  example, let's assume that you have 3 volumes defined, and the drive letter
  776.  assignments are as follows:
  777.  
  778.                  Volume 1  -     drives C: and D:
  779.                  Volume 2  -     drives E: and F:
  780.                  Volume 3  -     drives G: and H:
  781.  
  782.    For WHEREIS to work correctly, you would put the following line in your
  783.  AUTOEXEC.BAT file:
  784.  
  785.                     Set WI_DRIVES=CEG
  786.  
  787.    Now, when you search using the "-d" switch, WHEREIS won't list duplicate
  788.  filenames.  I have never used a Novell network, so I'm hoping that this
  789.  change will eliminate the problems.   This problem was brought up to me in
  790.  a letter from Bud Huddleston of Chamblee, GA.   Luckily, he went into great
  791.  detail on what the problem was.  The WI_DRIVES variable was the easiest
  792.  way I could think of to attack this problem.   If this isn't the best way
  793.  to handle the situation, I'd appreciate it if you Novell users would drop
  794.  me a line with suggestions.  Note that the search for the WI_DRIVES variable
  795.  CAN NOT be over-ridden from the command line.  If the WI_DRIVES variable
  796.  
  797.                                  WhereIs v4.1a                        Page 14
  798.  
  799.  
  800. The WHEREIS and WI_DRIVES Environment Variables
  801.  
  802.  
  803.  exists, it is used every time.  If you need to search a different list,
  804.  you must specify a drive list with the filename instead of using the "-d"
  805.  switch.  For example, "whereis cdfg:*.bat".
  806.  
  807.    For those users who are not on a network, you don't need to do anything
  808.  differently from version 3.5 of WHEREIS.   If the WI_DRIVES variable isn't
  809.  defined, then v3.6 will perform exactly as v3.5 did.
  810.  
  811.  
  812.                                  WhereIs v4.1a                        Page 15
  813.  
  814.  
  815. Duplicate Filename Searching
  816.  
  817.  
  818.  
  819.     V4.0 of WhereIs incorporates a feature that I've been wanting for a very
  820.   long time - the ability to search all drives, including Archive files, and
  821.   display only those files that are duplicated somewhere else.   This was a
  822.   fairly major upgrade to do, but it turned out (in my opinion) to be the best
  823.   added feature to WhereIs yet.
  824.  
  825.     Maybe I'm worse than other people at this, but I'm terrible about doing a
  826.   download of a file, un-Arcing it, and then starting to use it.  Of course,
  827.   the original of that file is still sitting out there somewhere in an Archive
  828.   file just eating up hard disk space.
  829.  
  830.     With the new -DUP feature, cleaning up your multiple hard drives from any
  831.   duplicate files is much easier.  But, be aware that when you invoke the -DUP
  832.   switch, WhereIs gets VERY memory-hungry.  This is because WhereIs must keep
  833.   information on every filename on all of your hard drives (including all of
  834.   those filenames in any Archive files) in memory AT ONE TIME.
  835.  
  836.     If you ever get the message "Error: out of memory!" when trying to find
  837.   duplicates across all drives, there are a couple of things that you can do.
  838.   First of all, see if you can free up any more memory by removing any TSR's
  839.   or device drivers.  If you still get the "out of memory" message, then there
  840.   are two different things that you can do.   The first is that you could
  841.   compare the drives two (or three) at a time.  For example, if you
  842.   have drives C:, D:, E:, and F:, first compare drives C: and D:, then C: and
  843.   E:, etc. until you've scanned them all.
  844.  
  845.     The second thing you can do (the way I prefer) is to do the duplicate scan
  846.   with a filemask; in other words, do the scan on *.EXE, then *.COM, then
  847.   *.BAT, etc.   For example, here's a sample of what you'd do:
  848.  
  849.               C:> whereis *.com -d -a
  850.  
  851.               C:> whereis *.bat -d -a
  852.  
  853.               C:> whereis *.exe -d -a
  854.  
  855.     I don't see the "out of memory" being a problem except for those people
  856.   with HUGE hard drives.  I have two 40-meg drives, both packed full of ZIP
  857.   files, and I never got close to filling up memory.   In addition, WhereIs
  858.   is fairly intelligent when saving the names in memory; for example, if
  859.   you have 300 files in the path C:\TEST1\TEMP\DATA, the actual pathname
  860.   will only get saved one time.  If you are looking for duplicates on a very
  861.   big hard drive system (let's say 80 meg or more), then WhereIs will take some
  862.   time.   Don't be alarmed if the program seems to not be doing anything;
  863.   searching the file tables of very large hard drives takes some time.  I
  864.   tinkered with the idea of putting in a twirling cursor or something so that
  865.   you'd know WhereIs was still alive, but I decided against it.  Since
  866.   duplicate searching will probably be redirected to a printer or a disk file
  867.   most of the time, I didn't want to trash up the display.
  868.  
  869.  
  870.  
  871.                                  WhereIs v4.1a                        Page 16
  872.  
  873.  
  874. Duplicate Filename Searching
  875.  
  876.  
  877.     Don't forget that the -DUP switch works in tandem with ALL other WhereIs
  878.   switches.   For example, specifying -DUP doesn't automatically scan all hard
  879.   drives and look inside all Archive files.  You must still specify the -A and
  880.   -D switches.    Also, filename exclusions still work just like normal.
  881.   Let's do a few examples:
  882.  
  883.  
  884.       C:> whereis -d -a -dup
  885.  
  886.                    This is the command you'll normally want to do when
  887.                    searching for duplicates.  It causes WhereIs to search
  888.                    all hard drives, and inside Archive files, looking for
  889.                    duplicates.
  890.  
  891.  
  892.       C:> whereis *.bat -d -a -dup
  893.  
  894.                    This command would only list the duplicate .BAT files
  895.                    on your hard drives.
  896.  
  897.       C:> whereis cd:*.* -a -dup -x*.bak -x*.doc
  898.  
  899.                    This command would display all duplicate files on drives
  900.                    C: and D: except any .BAK or .DOC files.
  901.  
  902.  
  903.                                  WhereIs v4.1a                        Page 17
  904.  
  905.  
  906. Change History
  907.  
  908.  
  909.  
  910.      v1.0       o  Initial release.
  911.  
  912.      v1.1-1.7   o  Internal testing changes.
  913.  
  914.      v1.8       o  Added the ability to specify multiple drives and filespecs
  915.                    on the command line (ie: whereis cde:*.dat d:test.prg).
  916.                 o  Added the '-D' switch to search all drives.
  917.                 o  Added the '-E' switch to allow "*.*" use for directory
  918.                    searches.
  919.                 o  Added the '-G' switch for "goto found subdirectory".
  920.                 o  Added the '-P' switch for page breaking.
  921.                 o  Added the '-V' switch for file deletion.
  922.                 o  Added support for the WHEREIS environment variable.
  923.                 o  Added the '-I' switch to ignore the environment variable.
  924.  
  925.      v1.9       o  Filenames are now searched for first in the current
  926.                    directory instead of searching for subdirectories first.
  927.  
  928.      v2.0       o  Changed to the three different display formats.
  929.                 o  Enhanced Control-C checking to allow aborting at any time.
  930.                    This was not the case in prior versions if a user didn't
  931.                    have BREAK=ON specified in their AUTOEXEC.BAT file.
  932.                 o  Changed the '-G' switch to prompt the user before going
  933.                    to the found subdirectory.
  934.  
  935.      v2.1-2.3   o  Internal testing changes.
  936.  
  937.      v2.4       o  Added the "European-style" date display, per a user's
  938.                    request.
  939.                 o  Added the '-W' switch to show wasted space.
  940.                 o  Added the '-H' switch to display filenames only.
  941.                 o  Added ZIP file searching.
  942.  
  943.      v2.5-2.6   o  Internal testing changes.
  944.  
  945.      v2.7       o  Added LHARC file searching.
  946.  
  947.      v2.8       o  Added ZOO file searching.
  948.  
  949.      v2.9       o  Internal testing changes.
  950.  
  951.      v3.0       o  Changed the default display mode to put the filename on
  952.                    the left of the screen.
  953.                 o  Added the ability to search specific ARC file formats.
  954.                 o  Added the '-AO' switch to search only archives.
  955.                 o  Added the '-F' to display filenames only.
  956.                 o  Changed the '-H' switch to start the search in the
  957.                    current directory.
  958.                 o  Added the ability to exclude filenames with the
  959.                    '-X' switch (up to 25 supported).
  960.                 o  Added the '-LT', '-EQ', and '-GT' switches for size
  961.  
  962.                                  WhereIs v4.1a                        Page 18
  963.  
  964.  
  965. Change History
  966.  
  967.  
  968.                    range searching.
  969.                 o  Added the '-S' and '-B' switches for date range
  970.                    searching.
  971.                 o  Added the '-C' switch for searching only the PATH
  972.                    directories.
  973.                 o  Changed the '-W' switch to get the true cluster size
  974.                    for each drive searched.  Earlier versions simply
  975.                    assumed a cluster size of 2048 bytes.
  976.  
  977.      v3.1       o  Fixed an obscure bug that would sometimes cause the
  978.                    'date range' search to display files out of the range
  979.                    if a file happenned to fall on the last day of any month
  980.                    that had 31 days in it.  All date range checks are now
  981.                    done with Greenwich Mean Time for added accuracy.
  982.  
  983.      v3.2-3.3   o  Internal testing changes.
  984.  
  985.      v3.4       o  Added grep-type searching on filenames.
  986.                 o  Added a '-U' switch to display all output in upper
  987.                    case.
  988.                 o  Changed so that if you don't specify at least one
  989.                    filespec on the command line, the default will be "*.*".
  990.                    For example, in earlier versions you would have to say
  991.                    "whereis *.* -s".  Now you can just say "whereis -s".
  992.  
  993.      v3.5       o  Sped up ZIP searching by 50% due to a new method of
  994.                    locating the "central directory".
  995.                 o  Sped up "grep" searching through archives by almost 70%.
  996.                 o  Added a '-z' switch, which only displays files that have
  997.                    their "archive bit" set (ie: displays files modified
  998.                    since your last backup was made).
  999.  
  1000.      v3.6       o  Added the "-hidden" switch which informs WHEREIS to
  1001.                    include system and hidden files in the search.
  1002.                 o  Added the optional WI_DRIVES environment variable to
  1003.                    hopefully alleviate some of the problems that occur
  1004.                    when WHEREIS is used on a Novell network.
  1005.  
  1006.      v3.7       o  Sped up the grep searching slightly.
  1007.                 o  ZIP searching now does a much better job of looking
  1008.                    for "corrupted" ZIP files.
  1009.  
  1010.      v3.8       o  These version numbers were skipped.
  1011.      v3.9
  1012.  
  1013.      v4.0       o  Added the ability to display only duplicate filename
  1014.                    entries.
  1015.                 o  v4.0 marks the beginning of Shareware marketing.
  1016.                 o  The program will no longer pause with the "More"
  1017.                    message if WhereIs detects that the output is being
  1018.                    redirected to a file or a printer.
  1019.  
  1020.  
  1021.                                  WhereIs v4.1a                        Page 19
  1022.  
  1023.  
  1024. Change History
  1025.  
  1026.  
  1027.      v4.1a      o  Added the ability to execute a DOS command on any file
  1028.                    matches found.
  1029.  
  1030.                 o  When you specify a "grep mask", WhereIs will now also
  1031.                    search inside of 4DOS's description files.
  1032.  
  1033. End of document.
  1034.  
  1035.